<template>
  <div class="header">
    <div class="header-left">
        <span class="iconfont back-icon">&#xe610;</span>
    </div>
    <div class="header-input">
        <span class="iconfont back-icon2">&#xe613;</span>
        输入城市游玩景点
    </div>
    <router-link to='/city'>
        <div class="header-right">
            {{this.city}}
            <span class="iconfont">&#xe6b5;</span>
        </div>
    </router-link>
  </div>
</template>

<script>
import { mapState, mapGetters } from 'vuex'
export default {
  name: 'HomeHeader',
  computed:{
      ...mapState(['city']),
    //   ...mapGetters(['doubleCity'])
  }
}
</script>

<style lang="stylus" scoped>
    @import '~style/varibles.styl'
    .header
        display: flex
        line-height: $headerHeight
        color: #fff
        background: $bgColor
        .header-left
            text-align: center
            width: .64rem
            float: left 
            .back-icon
                text-align: center
                font-size: .4rem
        .header-input
            flex: 1
            height: .64rem
            margin-top: .12rem
            line-height: .64rem
            margin-left: .2rem
            background: #fff
            border-radius: .1rem
            color: #ccc
            .back-icon2
                margin-left: .20rem
        .header-right
            overflow: hidden
            white-space: nowrap 
            float: right
            text-align: center
            color: #fff
            padding: 0 .1rem
</style>
